home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks97
/
WarriorsProgress.sit
/
Warrior’s Progress
/
source code
/
Source
/
Libraries
/
Context
/
Context.h
< prev
next >
Wrap
Text File
|
1997-06-28
|
840b
|
55 lines
// Context.h
#ifndef Context_h
#define Context_h
#ifndef Integers_h
#include "Integers.h"
#endif
class Context
{
friend class ContextUser;
private:
Context *const parent;
uint32 users;
bool active;
static Context *current;
void Activate();
void Deactivate();
void ReenterWithParents();
// not implemented:
Context( const Context& );
void operator=( const Context& );
protected:
virtual void Enter() = 0;
virtual void Leave() = 0;
virtual void Check() = 0;
virtual void Reenter() { Enter(); }
public:
Context();
~Context();
void BeCurrent();
void BeActive();
void BeInactive();
static void LeaveAll();
static void CheckActive();
static void ReenterActive();
static void Set( Context * );
static Context *Current() { return current; }
};
#endif